layui.extend({
    admin: '{/}../../static/js/admin'
});
layui.use(['laydate', 'jquery', 'admin'], function () {
    var laydate = layui.laydate,
        $ = layui.jquery,
        admin = layui.admin;
    //执行一个laydate实例
    laydate.render({
        elem: '#start' //指定元素
    });
    //执行一个laydate实例
    laydate.render({
        elem: '#end' //指定元素
    });

    /*订单-删除*/
    window.member_del = function (obj) {
        layer.confirm('确认要删除吗？', function () {
            var id = $(obj).parent(".td-manage").parent("tr").attr("data-id")
            //发异步删除数据
            $.get({
                url: "/order/del/"+id,
                success: function(data) {
                    $("#orderList").html(data)
                },
                async: false
            })
            var num = parseInt($(".fr>span").html())
            $(".fr>span").html(--num);
            $(obj).parents("tr").remove();
            layer.msg('已删除!', {
                icon: 1,
                time: 1000
            });
        });
    }
});